
Page({

  /**
   * 页面的初始数据
   */
  data: {
id:0,
ids:0,
gequliebiao:null as any,
pingjia:null as any,
image:null as any
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options:any) {
    let a=options.image
    let b= options.images
    let c=b+'==/'+a

    
    this.setData({
      id:options.id,
      // ids:options.ids,
      image:c
    })
// console.log(options.image);
this.huoqu()
  },

huoqu(){
  //歌曲列表
  wx.request({
    url:`http://localhost:3000/playlist/track/all?id=${this.data.id}&limit=20&offset=1`,
    method:'GET',
    success:(res:any)=>{
      // console.log(res.data.songs);
      this.setData({
        gequliebiao:res.data.songs
      })
    }
  })
  //评价
  wx.request({
    url:`http://localhost:3000/comment/playlist?id=${this.data.id}&offset=1&limit=10`,
    method:"GET", 
    success:(res:any)=>{
      console.log(res.data.comments);    
      this.setData({
        pingjia:res.data.comments
        
      })
    }

  })
},
tiao(){
wx.redirectTo({
  url:"../tiaozhuan/tianone/tiaozhuanone"
})
}
  
})